# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Erik Johnson <palehose at gmail dot com>
# Contributor: Jelle van der Waa <jelle@archlinux.org>

pkgname=python-hglib
pkgver=2.6.2
pkgrel=5
arch=('any')
url="https://pypi.python.org/pypi/python-hglib"
license=('MIT')
pkgdesc="A library with a fast, convenient interface to Mercurial. It uses Mercurial's command server for communication with hg."
depends=('python' 'mercurial')
checkdepends=('python-nose')
source=(https://files.pythonhosted.org/packages/fb/11/1cfa47d5e2aa45f6a803fcdf4484f8255383221ccb2f521d9010afca0d8d/$pkgname-$pkgver.tar.gz)
sha256sums=('b18bd1ed53c90ee57d5714d66ad6bb72b64e930d4aeca9830892c08bb28da608')

check() {
  cd ${pkgname}-${pkgver}
  python test.py
}

package() {
  cd ${pkgname}-${pkgver}
  python setup.py install --root="${pkgdir}" --optimize=1
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
